package com.sskj.mine.invite;

import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.flyco.tablayout.SlidingTabLayout;
import com.sskj.common.base.App;
import com.sskj.lib.Constans;
import com.sskj.lib.RConfig;
import com.sskj.lib.base.BaseActivity;
import com.sskj.mine.R;
import com.sskj.mine.R2;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * 我的团队
 */
@Route(path = RConfig.MINE_TEAM)
public class TeamActivity extends BaseActivity<TeamPresenter> {


    @BindView(R2.id.slidingTabLayout)
    SlidingTabLayout slidingTabLayout;
    @BindView(R2.id.viewPager)
    ViewPager viewPager;
    private String[] titles = new String[]{App.INSTANCE.getString(R.string.mine_teamActivity1), App.INSTANCE.getString(R.string.mine_teamActivity2)};

    @Override
    public int getLayoutId() {
        return R.layout.mine_activity_team;
    }

    @Override
    public TeamPresenter getPresenter() {
        return new TeamPresenter();
    }

    @Override
    public void initView() {
        setTitle(App.INSTANCE.getString(R.string.mine_teamActivity3));
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add((Fragment) ARouter.getInstance().build(RConfig.MINE_FRAGMENT_TEAM).withBoolean(Constans.IS_DIRECT, true).navigation());
        fragments.add((Fragment) ARouter.getInstance().build(RConfig.MINE_FRAGMENT_TEAM).withBoolean(Constans.IS_DIRECT, false).navigation());
        slidingTabLayout.setViewPager(viewPager, titles, this, fragments);
    }

}
